import 'package:distribution_mall_flutter/constant/cf_constant.dart';
import 'package:distribution_mall_flutter/utils/image_loader.dart';
import 'package:distribution_mall_flutter/widgets/list_item.dart';
import 'package:flutter/material.dart';

class MessageItem extends StatelessWidget {
  const MessageItem({super.key});

  List<Widget> itemChildren(String str1, String str2) {
    return [
      Text(
        str1,
        style: const TextStyle(
            color: ColorConstant.black, fontSize: FontConstant.f14),
      ),
      Text(
        str2,
        style: const TextStyle(
            color: ColorConstant.grey888, fontSize: FontConstant.f12),
      )
    ];
  }

  @override
  Widget build(BuildContext context) {
    return Ink(
      padding:
          EdgeInsets.fromLTRB(0, MediaQuery.of(context).padding.top + 10, 0, 0),
      child: Column(
        children: <Widget>[
          Padding(
            padding: const EdgeInsets.fromLTRB(EdgeConstant.edge20, 0, 10, 0),
            child: Row(
                mainAxisAlignment: MainAxisAlignment.spaceBetween,
                crossAxisAlignment: CrossAxisAlignment.center,
                children: [
                  const Text(
                    'Notify',
                    style: TextStyle(
                        fontSize: FontConstant.f24,
                        fontWeight: FontWeight.w600,
                        color: Color(0xFF292934)),
                  ),
                  IconButton(
                      onPressed: () => {print('lkefuy')},
                      icon: ImageLoader.imageAsset('message_kefu.png'))
                ]),
          ),
          EPListItem(
              leftIcon: ImageLoader.imageAsset('message_update.png'),
              showLeftIcon: true,
              height: 87,
              center: Expanded(
                child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children: itemChildren('update', 'description')),
              )),
          EPListItem(
              leftIcon: ImageLoader.imageAsset('message_spe.png'),
              showLeftIcon: true,
              height: 87,
              center: Expanded(
                child: Column(
                    mainAxisAlignment: MainAxisAlignment.center,
                    crossAxisAlignment: CrossAxisAlignment.start,
                    children:
                        itemChildren('message.specials', 'message.sales')),
              )),
        ],
      ),
    );
  }
}
